import request from '@/utils/request'
export default {
    
    addCourseInfo(courseInfo) {
        return request({
            url: `/eduservice/edu-course/addCourseInfo`,
            method: 'post',
            data:courseInfo
          })
    },
    getListTeacher() {
        return request({
            url: `/eduservice/edu_teacher/findAll`,
            method: 'get'
          })
    },
    
    getCourseInfoId(id) {
        return request({
            url: '/eduservice/edu-course/getCourseInfo/'+id,
            method: 'get'
          })
    },

    updateCourseInfo(courseInfo) {
        return request({
            url: '/eduservice/edu-course/updateCourseInfo',
            method: 'post',
            data: courseInfo
          })
    },

    getPublishCourseInfo(id) {
        return request({
            url: '/eduservice/edu-course/getPublishCourseInfo/'+id,
            method: 'get'
          })
    },
    publishCourse(id) {
        return request({
            url: '/eduservice/edu-course/publishCourse/'+id,
            method: 'post'
          })
    },
    //课程列表
    getListCourse(id) {
        return request({
            url: '/eduservice/edu-course',
            method: 'get'
          })
    },
    deleteCourse(courseId){
        return request({
            url:'/eduservice/edu-course/'+courseId,
            method:'delete'
        })
    }
}
